using Google.ProtocolBuffers;
using micromsg.Proto;
using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
namespace micromsg
{
	[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
	public sealed class Package : GeneratedMessageLite<Package, Package.Builder>
	{
		[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
		public sealed class Builder : GeneratedBuilderLite<Package, Package.Builder>
		{
			private bool resultIsReadOnly;
			private Package result;
			protected override Package.Builder ThisBuilder
			{
				get
				{
					return this;
				}
			}
			public override bool IsInitialized
			{
				get
				{
					return this.result.IsInitialized;
				}
			}
			protected override Package MessageBeingBuilt
			{
				get
				{
					return this.PrepareBuilder();
				}
			}
			public override Package DefaultInstanceForType
			{
				get
				{
					return Package.DefaultInstance;
				}
			}
			public int Id
			{
				get
				{
					return this.result.Id;
				}
				set
				{
					this.SetId(value);
				}
			}
			public int Version
			{
				get
				{
					return this.result.Version;
				}
				set
				{
					this.SetVersion(value);
				}
			}
			public string Name
			{
				get
				{
					return this.result.Name;
				}
				set
				{
					this.SetName(value);
				}
			}
			public uint Size
			{
				get
				{
					return this.result.Size;
				}
				set
				{
					this.SetSize(value);
				}
			}
			public SKBuiltinBuffer_t Thumb
			{
				get
				{
					return this.result.Thumb;
				}
				set
				{
					this.SetThumb(value);
				}
			}
			public string PackName
			{
				get
				{
					return this.result.PackName;
				}
				set
				{
					this.SetPackName(value);
				}
			}
			public SKBuiltinBuffer_t Ext
			{
				get
				{
					return this.result.Ext;
				}
				set
				{
					this.SetExt(value);
				}
			}
			public Builder()
			{
				this.result = Package.DefaultInstance;
				this.resultIsReadOnly = true;
			}
			internal Builder(Package cloneFrom)
			{
				this.result = cloneFrom;
				this.resultIsReadOnly = true;
			}
			private Package PrepareBuilder()
			{
				if (this.resultIsReadOnly)
				{
					Package other = this.result;
					this.result = new Package();
					this.resultIsReadOnly = false;
					this.MergeFrom(other);
				}
				return this.result;
			}
			public override Package.Builder Clear()
			{
				this.result = Package.DefaultInstance;
				this.resultIsReadOnly = true;
				return this;
			}
			public override Package.Builder Clone()
			{
				if (this.resultIsReadOnly)
				{
					return new Package.Builder(this.result);
				}
				return new Package.Builder().MergeFrom(this.result);
			}
			public override Package BuildPartial()
			{
				if (this.resultIsReadOnly)
				{
					return this.result;
				}
				this.resultIsReadOnly = true;
				return this.result.MakeReadOnly();
			}
			public override Package.Builder MergeFrom(IMessageLite other)
			{
				if (other is Package)
				{
					return this.MergeFrom((Package)other);
				}
				base.MergeFrom(other);
				return this;
			}
			public override Package.Builder MergeFrom(Package other)
			{
				return this;
			}
			public override Package.Builder MergeFrom(ICodedInputStream input)
			{
				return this.MergeFrom(input, ExtensionRegistry.Empty);
			}
			public override Package.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
			{
				this.PrepareBuilder();
				uint num;
				string text;
				while (input.ReadTag(out num, out text))
				{
					if (num == 0u && text != null)
					{
						int num2 = Array.BinarySearch<string>(Package._packageFieldNames, text, StringComparer.get_Ordinal());
						if (num2 < 0)
						{
							this.ParseUnknownField(input, extensionRegistry, num, text);
							continue;
						}
						num = Package._packageFieldTags[num2];
					}
					uint num3 = num;
					if (num3 <= 26u)
					{
						if (num3 <= 8u)
						{
							if (num3 == 0u)
							{
								throw InvalidProtocolBufferException.InvalidTag();
							}
							if (num3 == 8u)
							{
								this.result.hasId = input.ReadInt32(ref this.result.id_);
								continue;
							}
						}
						else
						{
							if (num3 == 16u)
							{
								this.result.hasVersion = input.ReadInt32(ref this.result.version_);
								continue;
							}
							if (num3 == 26u)
							{
								this.result.hasName = input.ReadString(ref this.result.name_);
								continue;
							}
						}
					}
					else
					{
						if (num3 <= 42u)
						{
							if (num3 == 32u)
							{
								this.result.hasSize = input.ReadUInt32(ref this.result.size_);
								continue;
							}
							if (num3 == 42u)
							{
								SKBuiltinBuffer_t.Builder builder = SKBuiltinBuffer_t.CreateBuilder();
								if (this.result.hasThumb)
								{
									builder.MergeFrom(this.Thumb);
								}
								input.ReadMessage(builder, extensionRegistry);
								this.Thumb = builder.BuildPartial();
								continue;
							}
						}
						else
						{
							if (num3 == 50u)
							{
								this.result.hasPackName = input.ReadString(ref this.result.packName_);
								continue;
							}
							if (num3 == 58u)
							{
								SKBuiltinBuffer_t.Builder builder2 = SKBuiltinBuffer_t.CreateBuilder();
								if (this.result.hasExt)
								{
									builder2.MergeFrom(this.Ext);
								}
								input.ReadMessage(builder2, extensionRegistry);
								this.Ext = builder2.BuildPartial();
								continue;
							}
						}
					}
					if (WireFormat.IsEndGroupTag(num))
					{
						return this;
					}
					this.ParseUnknownField(input, extensionRegistry, num, text);
				}
				return this;
			}
			public Package.Builder SetId(int value)
			{
				this.PrepareBuilder();
				this.result.hasId = true;
				this.result.id_ = value;
				return this;
			}
			public Package.Builder ClearId()
			{
				this.PrepareBuilder();
				this.result.hasId = false;
				this.result.id_ = 0;
				return this;
			}
			public Package.Builder SetVersion(int value)
			{
				this.PrepareBuilder();
				this.result.hasVersion = true;
				this.result.version_ = value;
				return this;
			}
			public Package.Builder ClearVersion()
			{
				this.PrepareBuilder();
				this.result.hasVersion = false;
				this.result.version_ = 0;
				return this;
			}
			public Package.Builder SetName(string value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasName = true;
				this.result.name_ = value;
				return this;
			}
			public Package.Builder ClearName()
			{
				this.PrepareBuilder();
				this.result.hasName = false;
				this.result.name_ = "";
				return this;
			}
			public Package.Builder SetSize(uint value)
			{
				this.PrepareBuilder();
				this.result.hasSize = true;
				this.result.size_ = value;
				return this;
			}
			public Package.Builder ClearSize()
			{
				this.PrepareBuilder();
				this.result.hasSize = false;
				this.result.size_ = 0u;
				return this;
			}
			public Package.Builder SetThumb(SKBuiltinBuffer_t value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasThumb = true;
				this.result.thumb_ = value;
				return this;
			}
			public Package.Builder SetThumb(SKBuiltinBuffer_t.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.hasThumb = true;
				this.result.thumb_ = builderForValue.Build();
				return this;
			}
			public Package.Builder MergeThumb(SKBuiltinBuffer_t value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				if (this.result.hasThumb && this.result.thumb_ != SKBuiltinBuffer_t.DefaultInstance)
				{
					this.result.thumb_ = SKBuiltinBuffer_t.CreateBuilder(this.result.thumb_).MergeFrom(value).BuildPartial();
				}
				else
				{
					this.result.thumb_ = value;
				}
				this.result.hasThumb = true;
				return this;
			}
			public Package.Builder ClearThumb()
			{
				this.PrepareBuilder();
				this.result.hasThumb = false;
				this.result.thumb_ = null;
				return this;
			}
			public Package.Builder SetPackName(string value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasPackName = true;
				this.result.packName_ = value;
				return this;
			}
			public Package.Builder ClearPackName()
			{
				this.PrepareBuilder();
				this.result.hasPackName = false;
				this.result.packName_ = "";
				return this;
			}
			public Package.Builder SetExt(SKBuiltinBuffer_t value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasExt = true;
				this.result.ext_ = value;
				return this;
			}
			public Package.Builder SetExt(SKBuiltinBuffer_t.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.hasExt = true;
				this.result.ext_ = builderForValue.Build();
				return this;
			}
			public Package.Builder MergeExt(SKBuiltinBuffer_t value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				if (this.result.hasExt && this.result.ext_ != SKBuiltinBuffer_t.DefaultInstance)
				{
					this.result.ext_ = SKBuiltinBuffer_t.CreateBuilder(this.result.ext_).MergeFrom(value).BuildPartial();
				}
				else
				{
					this.result.ext_ = value;
				}
				this.result.hasExt = true;
				return this;
			}
			public Package.Builder ClearExt()
			{
				this.PrepareBuilder();
				this.result.hasExt = false;
				this.result.ext_ = null;
				return this;
			}
		}
		public const int IdFieldNumber = 1;
		public const int VersionFieldNumber = 2;
		public const int NameFieldNumber = 3;
		public const int SizeFieldNumber = 4;
		public const int ThumbFieldNumber = 5;
		public const int PackNameFieldNumber = 6;
		public const int ExtFieldNumber = 7;
		private static readonly Package defaultInstance;
		private static readonly string[] _packageFieldNames;
		private static readonly uint[] _packageFieldTags;
		private bool hasId;
		private int id_;
		private bool hasVersion;
		private int version_;
		private bool hasName;
		private string name_ = "";
		private bool hasSize;
		private uint size_;
		private bool hasThumb;
		private SKBuiltinBuffer_t thumb_;
		private bool hasPackName;
		private string packName_ = "";
		private bool hasExt;
		private SKBuiltinBuffer_t ext_;
		private int memoizedSerializedSize = -1;
		public static Package DefaultInstance
		{
			get
			{
				return Package.defaultInstance;
			}
		}
		public override Package DefaultInstanceForType
		{
			get
			{
				return Package.DefaultInstance;
			}
		}
		protected override Package ThisMessage
		{
			get
			{
				return this;
			}
		}
		public int Id
		{
			get
			{
				return this.id_;
			}
		}
		public int Version
		{
			get
			{
				return this.version_;
			}
		}
		public string Name
		{
			get
			{
				return this.name_;
			}
		}
		public uint Size
		{
			get
			{
				return this.size_;
			}
		}
		public SKBuiltinBuffer_t Thumb
		{
			get
			{
				return this.thumb_ ?? SKBuiltinBuffer_t.DefaultInstance;
			}
		}
		public string PackName
		{
			get
			{
				return this.packName_;
			}
		}
		public SKBuiltinBuffer_t Ext
		{
			get
			{
				return this.ext_ ?? SKBuiltinBuffer_t.DefaultInstance;
			}
		}
		public override bool IsInitialized
		{
			get
			{
				return this.hasId && this.hasVersion;
			}
		}
		public override int SerializedSize
		{
			get
			{
				int num = this.memoizedSerializedSize;
				if (num != -1)
				{
					return num;
				}
				num = 0;
				if (this.hasId)
				{
					num += CodedOutputStream.ComputeInt32Size(1, this.Id);
				}
				if (this.hasVersion)
				{
					num += CodedOutputStream.ComputeInt32Size(2, this.Version);
				}
				if (this.hasName)
				{
					num += CodedOutputStream.ComputeStringSize(3, this.Name);
				}
				if (this.hasSize)
				{
					num += CodedOutputStream.ComputeUInt32Size(4, this.Size);
				}
				if (this.hasThumb)
				{
					num += CodedOutputStream.ComputeMessageSize(5, this.Thumb);
				}
				if (this.hasPackName)
				{
					num += CodedOutputStream.ComputeStringSize(6, this.PackName);
				}
				if (this.hasExt)
				{
					num += CodedOutputStream.ComputeMessageSize(7, this.Ext);
				}
				this.memoizedSerializedSize = num;
				return num;
			}
		}
		private Package()
		{
		}
		public override void WriteTo(ICodedOutputStream output)
		{
			int arg_06_0 = this.SerializedSize;
			string[] packageFieldNames = Package._packageFieldNames;
			if (this.hasId)
			{
				output.WriteInt32(1, packageFieldNames[1], this.Id);
			}
			if (this.hasVersion)
			{
				output.WriteInt32(2, packageFieldNames[6], this.Version);
			}
			if (this.hasName)
			{
				output.WriteString(3, packageFieldNames[2], this.Name);
			}
			if (this.hasSize)
			{
				output.WriteUInt32(4, packageFieldNames[4], this.Size);
			}
			if (this.hasThumb)
			{
				output.WriteMessage(5, packageFieldNames[5], this.Thumb);
			}
			if (this.hasPackName)
			{
				output.WriteString(6, packageFieldNames[3], this.PackName);
			}
			if (this.hasExt)
			{
				output.WriteMessage(7, packageFieldNames[0], this.Ext);
			}
		}
		public override int GetHashCode()
		{
			int num = base.GetType().GetHashCode();
			if (this.hasId)
			{
				num ^= this.id_.GetHashCode();
			}
			if (this.hasVersion)
			{
				num ^= this.version_.GetHashCode();
			}
			if (this.hasName)
			{
				num ^= this.name_.GetHashCode();
			}
			if (this.hasSize)
			{
				num ^= this.size_.GetHashCode();
			}
			if (this.hasThumb)
			{
				num ^= this.thumb_.GetHashCode();
			}
			if (this.hasPackName)
			{
				num ^= this.packName_.GetHashCode();
			}
			if (this.hasExt)
			{
				num ^= this.ext_.GetHashCode();
			}
			return num;
		}
		public override bool Equals(object value)
		{
			Package package = value as Package;
			return package != null && (this.hasId == package.hasId && (!this.hasId || this.id_.Equals(package.id_))) && (this.hasVersion == package.hasVersion && (!this.hasVersion || this.version_.Equals(package.version_))) && (this.hasName == package.hasName && (!this.hasName || this.name_.Equals(package.name_))) && (this.hasSize == package.hasSize && (!this.hasSize || this.size_.Equals(package.size_))) && (this.hasThumb == package.hasThumb && (!this.hasThumb || this.thumb_.Equals(package.thumb_))) && (this.hasPackName == package.hasPackName && (!this.hasPackName || this.packName_.Equals(package.packName_))) && (this.hasExt == package.hasExt && (!this.hasExt || this.ext_.Equals(package.ext_)));
		}
		public override void PrintTo(TextWriter writer)
		{
			GeneratedMessageLite<Package, Package.Builder>.PrintField("Id", this.hasId, this.id_, writer);
			GeneratedMessageLite<Package, Package.Builder>.PrintField("Version", this.hasVersion, this.version_, writer);
			GeneratedMessageLite<Package, Package.Builder>.PrintField("Name", this.hasName, this.name_, writer);
			GeneratedMessageLite<Package, Package.Builder>.PrintField("Size", this.hasSize, this.size_, writer);
			GeneratedMessageLite<Package, Package.Builder>.PrintField("Thumb", this.hasThumb, this.thumb_, writer);
			GeneratedMessageLite<Package, Package.Builder>.PrintField("PackName", this.hasPackName, this.packName_, writer);
			GeneratedMessageLite<Package, Package.Builder>.PrintField("Ext", this.hasExt, this.ext_, writer);
		}
		public static Package ParseFrom(byte[] data)
		{
			return Package.CreateBuilder().MergeFrom(data).BuildParsed();
		}
		private Package MakeReadOnly()
		{
			return this;
		}
		public static Package.Builder CreateBuilder()
		{
			return new Package.Builder();
		}
		public override Package.Builder ToBuilder()
		{
			return Package.CreateBuilder(this);
		}
		public override Package.Builder CreateBuilderForType()
		{
			return new Package.Builder();
		}
		public static Package.Builder CreateBuilder(Package prototype)
		{
			return new Package.Builder(prototype);
		}
		static Package()
		{
			Package.defaultInstance = new Package().MakeReadOnly();
			Package._packageFieldNames = new string[]
			{
				"Ext",
				"Id",
				"Name",
				"PackName",
				"Size",
				"Thumb",
				"Version"
			};
			Package._packageFieldTags = new uint[]
			{
				58u,
				8u,
				26u,
				50u,
				32u,
				42u,
				16u
			};
			object.ReferenceEquals(micromsg.Proto.Package.Descriptor, null);
		}
	}
}
